home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / freemarker.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  6KB  |  205 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  4.  
  5. <!-- A JEdit mode configuration file for FTL (FreeMarker Template Language)
  6.      Note that this version will only work with JEdit 4.1pre6 or later.
  7.      by Jonathan Revusky, revusky@users.sourceforge.net -->
  8.  
  9. <MODE>
  10.   <RULES IGNORE_CASE="FALSE">
  11.  
  12.     <!-- JavaScript -->
  13.     <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
  14.     <BEGIN><script</BEGIN>
  15.     <END></script></END>
  16.     </SPAN>
  17.     <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
  18.     <BEGIN><Script</BEGIN>
  19.     <END></Script></END>
  20.     </SPAN>
  21.     <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
  22.     <BEGIN><SCRIPT</BEGIN>
  23.     <END></SCRIPT></END>
  24.     </SPAN>
  25.  
  26.     <!-- stylesheet -->
  27.     <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
  28.     <BEGIN><style</BEGIN>
  29.     <END></style></END>
  30.     </SPAN>
  31.     <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
  32.     <BEGIN><Style</BEGIN>
  33.     <END></Style></END>
  34.     </SPAN>
  35.     <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
  36.     <BEGIN><STYLE</BEGIN>
  37.     <END></STYLE></END>
  38.     </SPAN>
  39.  
  40.     <!-- XML/HTML comment -->
  41.     <SPAN TYPE="COMMENT2" DELEGATE="xml::DTD-TAGS">
  42.     <BEGIN><!--</BEGIN>
  43.     <END>--></END>
  44.     </SPAN>
  45.  
  46.     <!-- DTD instructions -->
  47.     <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
  48.     <BEGIN><!</BEGIN>
  49.     <END>></END>
  50.     </SPAN>
  51.  
  52.     <!-- FTL markup starts here. -->
  53.  
  54.     <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
  55.       <BEGIN>${</BEGIN>
  56.       <END>}</END>
  57.     </SPAN>
  58.  
  59.     <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
  60.       <BEGIN>#{</BEGIN>
  61.       <END>}</END>
  62.     </SPAN>
  63.  
  64.     <SPAN_REGEXP TYPE="KEYWORD1" HASH_CHAR="<#ftl" DELEGATE="EXPRESSION">
  65.       <BEGIN><#ftl\b</BEGIN>
  66.       <END>></END>
  67.     </SPAN_REGEXP>
  68.  
  69.     <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="<">
  70.       <BEGIN><#?(if|elseif|switch|foreach|list|case|assign|local|global|setting|include|import|stop|escape|macro|function|transform|call|visit|recurse)(\s|/|$)</BEGIN>
  71.       <END>></END>
  72.     </SPAN_REGEXP>
  73.  
  74.     <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="</"
  75.     ></#?(assign|local|global|if|switch|foreach|list|escape|macro|function|transform|compress|noescape)></SEQ_REGEXP>
  76.  
  77.     <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="<">
  78.       <BEGIN><#?(else|compress|noescape|default|break|flush|nested|t|rt|lt|return|recurse)\b</BEGIN>
  79.       <END>></END>
  80.     </SPAN_REGEXP>
  81.  
  82.     <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="</@">
  83.       <BEGIN></@(([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*)*?)?</BEGIN>
  84.       <END>></END>
  85.     </SPAN_REGEXP>
  86.  
  87.     <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="<@">
  88.       <BEGIN><@([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*?)*</BEGIN>
  89.       <END>></END>
  90.     </SPAN_REGEXP>
  91.  
  92.     <SPAN TYPE="COMMENT1">
  93.       <BEGIN><#--</BEGIN>
  94.       <END>--></END>
  95.     </SPAN>
  96.  
  97.     <SEQ TYPE="KEYWORD1"><stop></SEQ>
  98.      <SPAN TYPE="COMMENT1">
  99.     <BEGIN><comment></BEGIN>
  100.     <END></comment></END>
  101.     </SPAN>
  102.     <SPAN TYPE="INVALID">
  103.       <BEGIN><#</BEGIN>
  104.       <END>></END>
  105.     </SPAN>
  106.     <SPAN TYPE="INVALID">
  107.       <BEGIN></#</BEGIN>
  108.       <END>></END>
  109.     </SPAN>
  110.  
  111.     <!-- non-FTL markup -->
  112.     <SPAN TYPE="MARKUP" DELEGATE="TAGS">
  113.     <BEGIN><</BEGIN>
  114.     <END>></END>
  115.     </SPAN>
  116.   </RULES>
  117.  
  118.   <RULES SET="EXPRESSION"
  119.       DEFAULT="KEYWORD2"
  120.       HIGHLIGHT_DIGITS="TRUE"
  121.       IGNORE_CASE="FALSE"
  122.     >
  123.     <SPAN TYPE="COMMENT1">
  124.       <BEGIN><#--</BEGIN>
  125.       <END>--></END>
  126.     </SPAN>
  127.     <SPAN TYPE="COMMENT1">
  128.       <BEGIN><!--</BEGIN>
  129.       <END>--></END>
  130.     </SPAN>
  131.  
  132.     <SPAN TYPE="LITERAL1" ESCAPE="\">
  133.     <BEGIN>"</BEGIN>
  134.     <END>"</END>
  135.     </SPAN>
  136.     <SPAN TYPE="OPERATOR" DELEGATE="EXPRESSION">
  137.       <BEGIN>(</BEGIN><END>)</END>
  138.     </SPAN>
  139.     <SEQ TYPE="OPERATOR">=</SEQ>
  140.     <SEQ TYPE="OPERATOR">!</SEQ>
  141.     <SEQ TYPE="OPERATOR">|</SEQ>
  142.     <SEQ TYPE="OPERATOR">&</SEQ>
  143.     <SEQ TYPE="OPERATOR"><</SEQ>
  144.     <SEQ TYPE="OPERATOR">></SEQ>
  145.     <SEQ TYPE="OPERATOR">*</SEQ>
  146.     <SEQ TYPE="OPERATOR">/</SEQ>
  147.     <SEQ TYPE="OPERATOR">-</SEQ>
  148.     <SEQ TYPE="OPERATOR">+</SEQ>
  149.     <SEQ TYPE="OPERATOR">%</SEQ>
  150.     <SEQ TYPE="OPERATOR">.</SEQ>
  151.     <SEQ TYPE="OPERATOR">:</SEQ>
  152.     <SEQ TYPE="OPERATOR">.</SEQ>
  153.     <SEQ TYPE="OPERATOR">.</SEQ>
  154.     <SEQ TYPE="OPERATOR">[</SEQ>
  155.     <SEQ TYPE="OPERATOR">]</SEQ>
  156.     <SEQ TYPE="OPERATOR">{</SEQ>
  157.     <SEQ TYPE="OPERATOR">}</SEQ>
  158.     <SEQ TYPE="OPERATOR">;</SEQ>
  159.     <!-- Builtins -->
  160.     <MARK_FOLLOWING TYPE="FUNCTION">?</MARK_FOLLOWING>
  161.     <KEYWORDS>
  162.       <KEYWORD1>true</KEYWORD1>
  163.       <KEYWORD1>false</KEYWORD1>
  164.       <KEYWORD1>as</KEYWORD1>
  165.       <KEYWORD1>in</KEYWORD1>
  166.       <KEYWORD1>using</KEYWORD1>
  167.       <OPERATOR>gt</OPERATOR>
  168.       <OPERATOR>gte</OPERATOR>
  169.       <OPERATOR>lt</OPERATOR>
  170.       <OPERATOR>lte</OPERATOR>
  171.     </KEYWORDS>
  172.   </RULES>
  173.  
  174.   <RULES SET="TAGS" DEFAULT="MARKUP">
  175.     <SPAN TYPE="LITERAL1" DELEGATE="INQUOTE">
  176.     <BEGIN>"</BEGIN>
  177.     <END>"</END>
  178.     </SPAN>
  179.  
  180.     <SPAN TYPE="LITERAL1" DELEGATE="INQUOTE">
  181.     <BEGIN>'</BEGIN>
  182.     <END>'</END>
  183.     </SPAN>
  184.  
  185.     <SEQ TYPE="OPERATOR">=</SEQ>
  186.   </RULES>
  187.  
  188.  
  189.   <!-- a ruleset for when we are within a quoted string within an SGML tag
  190.        It can contain FTL interpolations -->
  191.   <RULES SET="INQUOTE" ESCAPE="\">
  192.     <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
  193.     <BEGIN>${</BEGIN>
  194.     <END>}</END>
  195.     </SPAN>
  196.     <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
  197.     <BEGIN>#{</BEGIN>
  198.     <END>}</END>
  199.     </SPAN>
  200.   </RULES>
  201.  
  202.   <!-- empty ruleset to delegate to for spots where any non-whitespace is invalid -->
  203.   <RULES SET="INVALID" DEFAULT="INVALID" />
  204. </MODE>
  205.